package org.yang.loginunion.core.repository;

import org.yang.loginunion.core.model.BindAuthCode;

import java.util.HashMap;
import java.util.Map;

/**
 * @author Billyang
 * @date 2024/8/13 15:05
 */
public class CacheTempOauthRepository implements OauthTempRepository{

    Map<String,BindAuthCode> cache = new HashMap<>();

    @Override
    public void saveBindAuthCode(String bindCode, BindAuthCode bindAuthCode) {
        cache.put(bindCode, bindAuthCode);
    }

    @Override
    public BindAuthCode getBindAuthCode(String bindCode) {
        return cache.get(bindCode);
    }
}
